package cn.drenal.gui;

import cn.drenal.helper.GuiHelper;

import javax.swing.*;

public abstract class PetGui extends JFrame
{
    PetGui()
    {
        super();
    }
    PetGui(String title)
    {
        super(title);
    }
    public void showGui()
    {
        this.init();
        this.setVisible(true);
        this.setResizable(false);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        GuiHelper.setCenter(this);//设置窗口居中
    }
    private void init()
    {
        this.addComp();
        this.addListener();
    }
    protected void addComp(){}
    protected void addListener(){}
}
